import request from '@/utils/request'

export default {
  // 1.讲师列表（分页查询）
  getTeacherLisPage(page, limit, teacherQuery) {
    return request({
      url: `/eduservice/teacher/pageTeacherCondition/${page}/${limit}`,
      method: 'post',
      // data,表示把对象转换成json进行传递到接口中
      data: teacherQuery
    })
  },
  removeTeacher(id) {
    return request({
      url: `/eduservice/teacher/${id}`,
      method: 'get'
    })
  },
  save(teacher) {
    return request({
      url: `/eduservice/teacher/addTeacher`,
      method: 'post',
      data: teacher
    })
  },
  detail(id) {
    return request({
      url: `/eduservice/teacher/detail/${id}`,
      method: 'get'
    })
  },
  edit(teacher) {
    return request({
      url: `/eduservice/teacher/updateTeacher`,
      method: 'post',
      data: teacher
    })
  },
  getAllList() {
    return request({
      url: `/eduservice/teacher/getAllTeacherList`,
      method: 'get'
    })
  }
}
